<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Trae AI - 智能编程助手</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', 'Noto Serif SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .drop-cap:first-letter {
            float: left;
            font-size: 4.5rem;
            line-height: 0.65;
            margin: 0.1em 0.2em 0.1em 0;
            color: #667eea;
            font-weight: 700;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 md:py-32 px-6">
        <div class="max-w-4xl mx-auto text-center">
            <div class="inline-block bg-white bg-opacity-20 backdrop-filter backdrop-blur-sm rounded-full p-2 mb-6">
                <i class="fas fa-robot text-3xl"></i>
            </div>
            <h1 class="text-4xl md:text-6xl font-bold mb-6 font-serif">Trae AI</h1>
            <p class="text-xl md:text-2xl mb-8 max-w-2xl mx-auto opacity-90">下一代智能编程助手，基于革命性的AI Flow范式</p>
            <div class="flex justify-center space-x-4">
                <button class="bg-white text-indigo-700 px-6 py-3 rounded-full font-semibold hover:bg-opacity-90 transition duration-300 transform hover:scale-105">
                    开始体验
                </button>
                <button class="border border-white text-white px-6 py-3 rounded-full font-semibold hover:bg-white hover:bg-opacity-10 transition duration-300 transform hover:scale-105">
                    了解更多
                </button>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <div class="max-w-6xl mx-auto px-6 py-16">
        <!-- Introduction Section -->
        <section class="mb-20">
            <div class="flex flex-col md:flex-row items-center gap-12">
                <div class="md:w-1/2">
                    <h2 class="text-3xl font-bold mb-6 text-gray-800 font-serif">Trae AI简介</h2>
                    <div class="drop-cap text-gray-700">
                        <p>Trae AI是一款基于革命性AI Flow范式的智能编程助手，专为现代开发者设计。它能够在独立的IDE环境中运行，既可作为独立的编码助手，也能与用户进行结对编程，共同解决复杂的编程任务。</p>
                        <p class="mt-4">Trae AI的核心优势在于其强大的上下文理解能力和精准的任务执行能力，能够帮助开发者提高生产力、减少错误，并在整个开发生命周期中提供智能支持。</p>
                    </div>
                    <div class="mt-8 flex items-center space-x-4">
                        <div class="flex items-center">
                            <i class="fas fa-check-circle text-indigo-600 mr-2"></i>
                            <span>智能代码生成</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fas fa-check-circle text-indigo-600 mr-2"></i>
                            <span>错误诊断</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fas fa-check-circle text-indigo-600 mr-2"></i>
                            <span>结对编程</span>
                        </div>
                    </div>
                </div>
                <div class="md:w-1/2">
                    <div class="bg-white rounded-xl shadow-lg overflow-hidden">
                        <div class="p-6 bg-gray-800 text-white flex items-center">
                            <div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
                            <div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
                            <div class="w-3 h-3 rounded-full bg-green-500 mr-2"></div>
                            <span class="ml-2 text-sm">trae-ai-demo.js</span>
                        </div>
                        <div class="p-6 bg-gray-900 text-gray-300 font-mono text-sm">
                            <div class="mb-2"><span class="text-purple-400">function</span> <span class="text-yellow-300">calculateSum</span>(a, b) {</div>
                            <div class="ml-4 mb-2"><span class="text-purple-400">return</span> a + b;</div>
                            <div class="mb-4">}</div>
                            <div class="text-green-400">// Trae AI 会自动分析代码上下文</div>
                            <div class="text-green-400">// 并提供智能建议和优化</div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Core Features -->
        <section class="mb-20">
            <h2 class="text-3xl font-bold mb-12 text-center text-gray-800 font-serif">核心功能与优势</h2>
            <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
                <div class="bg-white p-8 rounded-xl shadow-md card-hover">
                    <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mb-6">
                        <i class="fas fa-code text-indigo-600 text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-gray-800">代码生成与补全</h3>
                    <p class="text-gray-600">基于上下文智能生成高质量代码，提供精准的代码补全建议，显著提升开发效率。</p>
                </div>
                <div class="bg-white p-8 rounded-xl shadow-md card-hover">
                    <div class="w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-6">
                        <i class="fas fa-bug text-purple-600 text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-gray-800">错误诊断与修复</h3>
                    <p class="text-gray-600">实时识别代码中的潜在问题，提供详细的错误解释和修复建议，减少调试时间。</p>
                </div>
                <div class="bg-white p-8 rounded-xl shadow-md card-hover">
                    <div class="w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-6">
                        <i class="fas fa-users text-blue-600 text-2xl"></i>
                    </div>
                    <h3 class="text-xl font-bold mb-3 text-gray-800">结对编程协作</h3>
                    <p class="text-gray-600">与开发者实时协作，共同解决问题，提供替代解决方案和最佳实践建议。</p>
                </div>
            </div>
        </section>

        <!-- Architecture Visualization -->
        <section class="mb-20">
            <h2 class="text-3xl font-bold mb-12 text-center text-gray-800 font-serif">AI Flow 架构</h2>
            <div class="bg-white p-8 rounded-xl shadow-md">
                <div class="mermaid">
                    flowchart TD
                    A[用户输入] --> B(任务分析)
                    B --> C{是否需要工具?}
                    C -->|是| D[调用工具]
                    C -->|否| E[直接响应]
                    D --> F[工具执行]
                    F --> G[结果处理]
                    G --> H[输出响应]
                    E --> H
                    H --> I[用户反馈]
                    I -->|迭代| B
                </div>
                <script>
                    mermaid.initialize({startOnLoad:true});
                </script>
            </div>
        </section>

        <!-- Guidelines Section -->
        <section class="mb-20">
            <div class="bg-indigo-50 p-8 rounded-xl">
                <h2 class="text-2xl font-bold mb-6 text-indigo-800 font-serif">核心指导原则</h2>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-lg font-semibold mb-3 text-gray-800 flex items-center">
                            <i class="fas fa-code mr-2 text-indigo-600"></i>代码编辑规范
                        </h3>
                        <ul class="space-y-3 text-gray-700">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                                <span>使用<code class="bg-gray-200 px-1 rounded">// ... existing code ...</code>表示未修改代码</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                                <span>提供清晰的代码语言标识和文件路径</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                                <span>确保代码可立即运行</span>
                            </li>
                        </ul>
                    </div>
                    <div>
                        <h3 class="text-lg font-semibold mb-3 text-gray-800 flex items-center">
                            <i class="fas fa-tools mr-2 text-indigo-600"></i>工具调用规范
                        </h3>
                        <ul class="space-y-3 text-gray-700">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                                <span>严格遵循工具模式定义</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                                <span>不调用不存在的工具</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                                <span>确保参数准确完整</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Use Cases -->
        <section>
            <h2 class="text-3xl font-bold mb-12 text-center text-gray-800 font-serif">典型应用场景</h2>
            <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
                <div class="bg-white rounded-xl overflow-hidden shadow-md card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-green-100 p-2 rounded-full mr-4">
                                <i class="fas fa-file-code text-green-600"></i>
                            </div>
                            <h3 class="text-xl font-bold text-gray-800">新项目创建</h3>
                        </div>
                        <p class="text-gray-600">帮助用户快速搭建项目框架，根据需求生成初始代码结构，避免重复性工作。</p>
                    </div>
                </div>
                <div class="bg-white rounded-xl overflow-hidden shadow-md card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-red-100 p-2 rounded-full mr-4">
                                <i class="fas fa-bug text-red-600"></i>
                            </div>
                            <h3 class="text-xl font-bold text-gray-800">错误修复</h3>
                        </div>
                        <p class="text-gray-600">分析错误日志和代码上下文，定位问题根源并提供修复方案，缩短调试时间。</p>
                    </div>
                </div>
                <div class="bg-white rounded-xl overflow-hidden shadow-md card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-2 rounded-full mr-4">
                                <i class="fas fa-exchange-alt text-blue-600"></i>
                            </div>
                            <h3 class="text-xl font-bold text-gray-800">代码重构</h3>
                        </div>
                        <p class="text-gray-600">识别代码中的坏味道，建议重构方案，提升代码的可读性和可维护性。</p>
                    </div>
                </div>
                <div class="bg-white rounded-xl overflow-hidden shadow-md card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-purple-100 p-2 rounded-full mr-4">
                                <i class="fas fa-search text-purple-600"></i>
                            </div>
                            <h3 class="text-xl font-bold text-gray-800">信息检索</h3>
                        </div>
                        <p class="text-gray-600">根据上下文提供相关技术文档、API参考和最佳实践，减少手动搜索时间。</p>
                    </div>
                </div>
            </div>
        </section>
    </div>
</body>
</html>